/*
  LinPVR - Linux Personal Video Recorder
  Copyright (C) 2006 Kamil Pawlowski <kamilpe@gmail.com>

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation; either version 2
  of the License, or (at your option) any later version.
  
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
*/
#ifndef _GUI_H_
#define _GUI_H_

#include <gtk/gtk.h>
#include <glade/glade.h>
#include "capture.h"
#include "video.h"

#define COL_LIB_NAME     0
#define COL_LIB_DATE     1
#define COL_LIB_LENGTH   2
#define COL_LIB_EXT      3
#define COL_SHD_NAME     0
#define COL_SHD_CHANNEL  1
#define COL_SHD_START    2
#define COL_SHD_STOP     3
#define COL_SHD_QUALITY  4

typedef struct preview_s {
  guint           previd;
  guint           contextid;
  GdkPixbuf      *pixbuf;
  GtkDrawingArea *area;
  GtkStatusbar   *statusbar;
  capture_t      *capture;
} preview_t;

void show_videodev_info(GladeXML *glade, GtkWindow *parent, videodev_t *video);
void show_devices_list(GladeXML *glade, GtkWindow *parent);
void show_error_report(GladeXML *glade, const char *message);

void prepare_library_tree(GtkTreeView *tree);
void prepare_formats_tree(GtkTreeView *tree);
void prepare_devices_tree(GtkTreeView *tree);
void prepare_channels_tree(GtkTreeView *tree);
void prepare_sheduler_tree(GtkTreeView *tree);

void set_properties_by_gui(GladeXML *glade, capture_t *capture);

gboolean preview_update(preview_t *preview);
int      preview_init(preview_t *preview, GladeXML *glade);
#endif
